package com.scs.application.modules.finance.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.core.query.QueryContext;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.finance.dto.BillItemDTO;
import com.scs.application.modules.finance.dto.SettlementMainDTO;
import com.scs.application.modules.finance.entity.Bill;
import com.scs.application.modules.finance.entity.BillItem;
import com.scs.application.modules.sys.model.RestResult;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  Service
 * </p>
 */

public interface BillService extends IBaseService<Bill> {

    List<Bill> findThisMonthDeptUse();

    List<BillItemDTO> findThisMonthMaterialUse();

    List<Bill> findThisYearOmocUse();

    List<Bill> findThisYearMaterialUse();

    default  IPage billHighPage(QueryContext context){
        throw  new RuntimeException("未实现");
    };

    default  List<SettlementMainDTO> billHighList(QueryContext context){
        throw  new RuntimeException("未实现");
    };

    default  IPage billLowPage(QueryContext context){
        throw  new RuntimeException("未实现");
    };

    default  List<SettlementMainDTO> billLowList(QueryContext context){
        throw  new RuntimeException("未实现");
    };

    /**
    * @Description：入账打印
    * @param itemIdArr 业务明细id数组
    */
    default RestResult billPrint(String printType, List<String> itemIdArr,boolean isAll,String queryString){
        throw  new RuntimeException("未实现");
    };

    @Transactional(rollbackFor = Exception.class)
    default  String billPrintAddDtl(String printType, List<String> itemIdArr, String billId){
        throw  new RuntimeException("未实现");
    };

    /**
     * @Description：入账取消打印
     * @param itemIdArr 业务明细id数组
     * @param billItemList 记账单明细列表
     */
    default  String billPrintCancel( String[] itemIdArr,List<BillItem> billItemList){
        throw  new RuntimeException("未实现");
    };
}
